<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>


	
	<style type="text/css"></style>

	<jsp:include page="/AdminV3/include/main.jsp"></jsp:include>
	
	<jsp:include page="/AdminV3/include/expand/login.jsp"></jsp:include>
	
	<script type="text/javascript">
		$(function(){
			$("#login").click(function(){
				var name = $("#login_name");
				var pwd = $("#login_password");
				if(name.val()==""){
					alert("请输入用户名!");
					name.select();
					return;
				}
				if(pwd.val()==""){
					alert("请输入密码!");
					pwd.select();
					return;
				}
				var resp = new AJAX().postUnAsync("../../systemservlet", 
						{
							"loginName":name.val(),
							"loginPassword":pwd.val(),
							"item":"adminlogin"});
				if(resp=="userError"){
					alert("用户不存在！");
					return;
				}
				if(resp=="passwordError"){
					alert("用户密码错误！");
					return;
				}
				if(resp=="success"){
					alert("登录成功！");
					
					location.href="userinfo.jsp";
					
					return;
				}
				
			});
			
		});
	</script>
</head>
<body>
	
	   <div id="header">
	   		<div >
		   		后台管理系统
	   		</div>
	   </div>
	   
	   <div id="content" >
	   		<div id="left">
   			<div class="span">
   				<div class="h1">
   					登录后台管理系统
   				</div>
   				
   				<div class="input">
  					<div class="input_name">
						 <div class="name">
						 	<input type="text" class="login_name"  id="login_name"  placeholder="邮箱/用户名" />
						 </div>
  					</div>
  					<div class="input_name">
						 <div  class="password">
  							<input type="password" class="login_password" id="login_password" placeholder="密码" />
						 </div> 	
  					</div>
  					
  					<div class="button_name">
  						<div class="login" id="login">
  							登录
  						</div>
  						<div class="txt">
  							记住我
  							忘记密码?
  						</div>
  					</div>
  					
  					<div class="together">
  						<div class="h2">
		   					<span>用合作帐号登陆
		   					</span>
		   					<span >
			   					<img src="../images/microblog.png"/>
			   					<img src="../images/wechat.png"/>
			   					<img src="../images/qq.png"/>
		   					</span>
		   				</div>
  					</div>
   				</div>
   			</div>
   		</div>
   		<div id="right">
   			<div class="span">
				<div class="h1">
   					还不是该平台的用户?
   				</div>
   				
   				<div class="register">
  					 <div class="txt">
  					 	点击快速注册
  					 </div>
  					 <div class="button" onclick="location.href='register.jsp';">
  					 	注册
  					 </div>
   				</div>
			</div>
   		</div>
	   </div>
	   
	   <div id="floor">
	   		For SystemManage internal usage only
	   </div>
	
</body>
</html>